package maple.util;

public class Tuple extends Object
{
	private long _timestamp;
	private String _type;
	private String _value;

	/**
	 * construct a new tuple with the specified timestamp, type and value
	 *
	 * @param	timestamp	the specified timestamp
	 * @param	type		the specified type
	 * @param	value		the specified value
	 *
	 * @author	snowfoxy
	 * @since	2011-11-27
	 */
	public Tuple( final long timestamp, final String type, final String value )
	{
		_timestamp = timestamp;
		_type = type;
		_value = value;
	}

	/**
	 * return true if this tuple is valid 
	 *
	 * @return	true if this tuple is valid 
	 *
	 * @author	snowfoxy
	 * @since	2011-11-27
	 */
	public boolean isValid()
	{
		if( _timestamp < 0 )
		{
			return false;
		}
		return true;
	}

	/**
	 * return the timestamp of this tuple
	 *
	 * @return	the timestamp of this tuple
	 *
	 * @author	snowfoxy
	 * @since	2011-11-27
	 */
	public long getTimestamp()
	{
		return _timestamp;
	}

	/**
	 * return the type of this tuple
	 *
	 * @return	the type of this tuple
	 *
	 * @author	snowfoxy
	 * @since	2011-11-27
	 */
	public String getType()
	{
		return _type;
	}

	/**
	 * return the value of this tuple
	 *
	 * @return	the value of this tuple
	 *
	 * @author	snowfoxy
	 * @since	2011-11-27
	 */
	public String getValue()
	{
		return _value;
	}
}
